<?php
import('login.class.php');
class Verifier {
	
	/**
	 * true 表示验证通过，无需跳转
	 * false 表示验证失败，需要跳转
	 */
	public function verify(){
		global $__controller,$__action;
		if($__action != 'login'){
			return Login::isLogin();
		}else{
			return true;
		}
	}
	
	public function do_fix(){
		global $__controller,$__action;
		$__controller = 'login';
		$__action = 'need_login';
		log_i("Fixed the request and set contoller to [$__controller] and action to [$__action]");
	}
}